/*
* @Author: ystlong
* @Date:   2018-07-21 02:04:35
* @Last Modified by:   ystlong
* @Last Modified time: 2018-07-21 02:06:03
*/
#include "barelib.h"

/*
 * 读取当前tick计数
 */
long read_counter()
{
	long count;
	asm("mrs %0, cntpct_el0" : "=r"(count));
	return count;
}

/*
 * 读取设置的系统频率， 读取可能可能为0
 */
long read_frq()
{
	long frq;
	asm("mrs %0, cntfrq_el0" : "=r"(frq));
	return frq;
}
